<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
  <head>
    <title>$Title$</title>
    <link rel="stylesheet" type="text/css" href="static/plugins/jquery-easyui-1.10.19/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="static/plugins/jquery-easyui-1.10.19/themes/icon.css">
    <script type="text/javascript" src="static/plugins/jquery-easyui-1.10.19/jquery.min.js"></script>
    <script type="text/javascript" src="static/plugins/jquery-easyui-1.10.19/jquery.easyui.min.js"></script>
    <script>
      $(function (){
        $('#menu .easyui-linkbutton').click(function (){
          // alert(this.innerText);
          if($('#tt').tabs('exists',this.innerText))
          {
            $('#tt').tabs('select',this.innerText)
          }
          else{
            //获取url
            let url = $(this).data('url')
            // 添加一个新的标签页面板（tab panel）
            $('#tt').tabs('add',{
              title:this.innerText,
              content:'<iframe src ="'+url+'" frameborder ="0" scrolling = "true" style="width:100%; height: 100%"></iframe>',
              closable:true,
            });
          }
        })
        // tools:[{
        //   iconCls:'icon-mini-refresh',
        //   handler:function(){
        //     alert('refresh');
        //   }
        // }]
      })

    </script>
  </head>

  <%
    if(session.getAttribute("username") ==null) response.sendRedirect("/lab00/login2.jsp");
  %>

  <body class="easyui-layout">
  <div data-options="region:'north',border:false" style="height:80px">
    <img src="static/images/newlogo.png" >
    <div style="float:right; margin: 22px">欢迎你，<%=session.getAttribute("username")%>老师
      <a href="login2Servlet?action=logout" class="easyui-linkbutton" data-options="iconCls:'icon-back' ,plain:true">退出</a>
    </div>
  </div>
  <div data-options="region:'west',split:true,title:'系统功能'" style="width:260px;">
    <div id="menu" class="easyui-accordion" data-options="fit:true">
      <div title="成绩管理" data-options="iconCls:'icon-help'"style="padding:10px;">
        <a href="#" class="easyui-linkbutton" data-url ="teacher/achievementlist.jsp" data-options="iconCls:'icon-add'" style="width: 100%;margin-bottom: 10px">学生成绩</a>
      </div>
      <div title="课程管理" data-options="iconCls:'icon-help'"style="padding:10px;">
        <a href="#" class="easyui-linkbutton" data-url ="teacher/courselist.jsp" data-options="iconCls:'icon-add'" style="width: 100%;margin-bottom: 10px">课程表</a>
      </div>
<%--      <div title="选修课管理" data-options="iconCls:'icon-help'"style="padding:10px;">--%>
<%--        <a href="#" class="easyui-linkbutton" data-url ="teacher/achievementlist.jsp" data-options="iconCls:'icon-add'" style="width: 100%;margin-bottom: 10px">选修课表</a>--%>
<%--      </div>--%>
      <div title="个人中心" data-options="iconCls:'icon-help'" style="padding:10px;">
        <a href="#" class="easyui-linkbutton" data-url ="teacher/teacherlist.jsp" data-options="iconCls:'icon-add'" style="width: 100%;margin-bottom: 10px">个人信息</a>
      </div>

      </div>
    </div>
  <div data-options="region:'south',border:false" style="height:45px;padding:10px;text-align: center">
    地址：重庆市巴南区红光大道69号重庆理工大学计算机科学与工程学院
  </div>
  <div data-options="region:'center',border:false">
    <div id="tt" class="easyui-tabs" data-options ="fit:true">
      <div title="首页" style="padding:10px">
        <p style="font-size:14px">jQuery EasyUI framework helps you build your web pages easily.</p>
        <ul>
          <li>easyui is a collection of user-interface plugin based on jQuery.</li>
          <li>easyui provides essential functionality for building modem, interactive, javascript applications.</li>
          <li>using easyui you don't need to write many javascript code, you usually defines user-interface by writing some HTML markup.</li>
          <li>complete framework for HTML5 web page.</li>
          <li>easyui save your time and scales while developing your products.</li>
          <li>easyui is very easy but powerful.</li>
        </ul>
      </div>
<%--      <div title="购买管理" style="padding:10px">--%>
<%--        <ul class="easyui-tree" data-options="url:'tree_data1.json',method:'get',animate:true"></ul>--%>
<%--      </div>--%>
<%--      <div title="转借管理" data-options="iconCls:'icon-help',closable:true" style="padding:10px">--%>
<%--        This is the help content.--%>
<%--      </div>--%>
    </div>
  </div>
  </body>
</html>
